<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>数据录入界面</title>    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
	<script type="text/javascript">
		$(function(){
			$("#loadData").bind('click',function(){
				$.ajax({
					url:"servlet/InsertData",
					data:{"loadType":"1","type":$("#type").val()},
					type:"post",
					dataType:"text",
					success:function(msg){
						alert(msg);
					},error:function(xhr,status,t){
						alert(xhr+"\n"+status+"\n"+t);
					}
				});
			});
			
			
			$("#lookData").bind("click",function(){
				this.href="lottery/dataChart.jsp?type="+$("#type").val();
			});
		});
	</script>
  </head>
  
  <body>
    <center>
    	<div style="width:200px;">
    		<select id="type">
    		<option value="1" selected="selected">双色球</option>
    		<option value="2" >大乐透</option>
    		<option value="3" >七乐彩</option>
    		<option value="4" >七星彩</option>
    		</select>
	    	<button id="loadData">数据导入</button>
    	</div>
    	<div style="width:200px;float:right;"><a href="javascript;" id="lookData" target="_blank">查看数据分布</a></div>
   		<div><a href="lottery/lottery.jsp">返回</a></div>
    </center> <br>
  </body>
</html>
